import React, {Component} from 'react';
import {observer} from 'mobx-react';
import {HashRouter as Router, Route, Redirect} from 'react-router-dom';
import history from '../route/history';
import Home from "./home/Home";
import About from "./about/About";

@observer
export default class App extends Component {
    render() {
        return (
            <Router history={history}>
                <div>
                    <Route exact path="/" render={() => (
                        <Redirect to="/home"/>
                    )}/>
                    <Route path="/home" component={Home}/>
                    <Route path="/about" component={About}/>
                </div>
            </Router>
        );
    }
}